package net.springmvc13_14.controller;

import lombok.Data;
import net.springmvc13_14.entity.Stu;
import org.apache.ibatis.annotations.Delete;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

@Controller
@ResponseBody
@RequestMapping("user")
public class UserRestFulController {

    @GetMapping
    public String list() {
        return null;
    }
//    @GetMapping
//    public String selectOne(@RequestParam String name) {
//        return null;
//    }

    @GetMapping("/{id}")
    public String SelectById(@PathVariable String id) {

        return null;
    }

    @PostMapping
    public String insert(@RequestBody Stu stu) {
        System.out.println("PostMapping");
        return null;
    }
    @PutMapping
    public String update(@RequestBody Stu stu) {
        System.out.println(stu);
        System.out.println("PutMapping");
        return null;
    }

    @DeleteMapping("/{id}")
    public String delete(@PathVariable String id) {
        System.out.println("Delete");
        return null;
    }




}
